﻿#define DEBUGGER
#define TEST

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharpDemo._01_核心
{
    class Pre
    {
        public static void TestPre()
        {
            //1.条件编译
#if DEBUGGER && TEST
                 Console.WriteLine("定义了debugger指令和test指令");
#elif TEST
                Console.WriteLine("定义了test指令");
#else 
                Console.WriteLine("没有定义debugger指令和test指令");
#endif

            //#warning "编译器给出警告"
            //#error "编译器给出错误"

            #region  "定义一个代码块 ， 是代码在布局上面更好看"

            #endregion

            //抑制或者还原编译器警告
#pragma warning disable
            int a;
#pragma warning restore
        }


    }
}
